﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DailyInspectManage.aspx.cs"
    Inherits="DailyInspectManage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="css/style.css" rel="stylesheet" type="text/css" />

    <script src="js/date.js" type="text/javascript" language="javascript"></script>

    <script src="js/jquery-1.4.2.min.js" type="text/javascript" language="javascript"></script>

    <script type="text/javascript">
        $(document).ready(function() {
            $("#Btn_Add").click(function()//提交
            {
                var strRights = "", strName = "";
                $("#tbItem :checkbox[checked]").each(function() {
                    strRights += $(this).val() + ",";
                });
                if (strRights.length > 0) {
                    strRights = strRights.substr(0, strRights.length - 1);
                    $("#hidItem").val(strRights);
                }
                $("#tbItem :text").each(function() {
                    strName += $(this).val() + ",";
                });
                if (strName.length > 0) {
                    strName = strName.substr(0, strName.length - 1);
                    $("#hidName").val(strName);
                }
                if ($("#txtItemNumber").val() == "") {
                    alert("巡检项目号不能为空!");
                    $("#txtItemNumber").focus();
                    return false;
                }
                if ($("#txtDate").val() == "") {
                    alert("巡检时间不能为空!");
                    $("#txtDate").focus();
                    return false;
                }
                if ($("#txtErrorReason").val() == "") {
                    alert("故障原因不能为空!");
                    $("#txtErrorReason").focus();
                    return false;
                }
                if ($("#txtErrSolve").val() == "") {
                    alert("处理情况不能为空!");
                    $("#txtErrSolve").focus();
                    return false;
                }
                //                alert(strRights);
            });
        });
    </script>

    <style type="text/css">
        .tblist tr td
        {
            padding: 5px;
            padding: 5px;
            border: solid 1px;
        }
        .txt{width:80px;}
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table width="842" border="0" cellpadding="0" cellspacing="0" align="center">
            <tr style="color: blue; font-size: 14px;">
                <td style="height: 14px; width: 502px;">
                    <img src="images/ADD.gif" width="14px" height="14px" />巡检记录维护--&gt;大厅日常巡检
                </td>
            </tr>
            <tr style="color: blue; font-size: 14px;">
                <td style="height: 14px; width: 570px;" colspan="2">
                    <br />
                    巡检项目号：<asp:TextBox ID="txtItemNumber" runat="server" Width="115px"></asp:TextBox>
                    &nbsp;&nbsp;所属部门：<asp:DropDownList ID="ddlDpt" runat="server" DataSourceID="DeviceDptDataSource"
                        DataTextField="departmentName" DataValueField="departmentId" Width="120px">
                    </asp:DropDownList>
                    <%--&nbsp;故障类型：<asp:DropDownList ID="ddlErrType" runat="server" DataSourceID="DeviceErrTypeSource"
                        DataTextField="errTypeName" DataValueField="errTypeId" Width="120px">
                    </asp:DropDownList>--%>
                    &nbsp;
                    <br />
                    <br />
                    巡检时间：&nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox ID="txtDate" runat="server" MaxLength="20"
                        Width="115px" onfocus="javascript:HS_setDate(this,'btnSelect');"></asp:TextBox>
                    <asp:Button ID="btnSelect" runat="server" Style="display: none" />
                    &nbsp;
                    <%-- 资产编号：<asp:TextBox ID="deviceNumber" runat="server" Width="115px"></asp:TextBox>&nbsp;
                    &nbsp;--%>巡检人：&nbsp;&nbsp;&nbsp;&nbsp;<asp:DropDownList ID="ddlMaintPerson" AutoPostBack="true"
                        runat="server" Width="120px" DataSourceID="DeviceMaintPersonSource" DataTextField="maintPersonName"
                        DataValueField="maintPersonId">
                    </asp:DropDownList>
                    &nbsp; 故障是否解决：<asp:CheckBox ID="cbisSolve" runat="server" Text="是" Checked="true" />
                    <br />
                    <br />
                </td>
            </tr>
            <tr>
                <td>
                    <table id="tbItem" width="auto" cellpadding="0" cellspacing="0" class="tblist">
                        <colgroup>
                            <col align="right" width="200px" />
                            <col align="right" width="100px" />
                            <col align="right" width="100px" />
                            <col align="right" width="100px" />
                            <col align="right" width="100px" />
                            <col align="right" width="100px" />
                        </colgroup>
                        <tr>
                            <td>
                                时间段
                            </td>
                            <td>
                                PDP屏
                            </td>
                            <td>
                                条屏
                            </td>
                            <td>
                                触摸屏
                            </td>
                            <td>
                                排号机
                            </td>
                            <td>
                                LED大屏
                            </td>
                            <td>
                                人员姓名
                            </td>
                        </tr>
                        <tr>
                            <td>
                                9:00-10:00：
                            </td>
                            <td>
                                <input id="cb11" type="checkbox" runat="server" value="11" />
                            </td>
                            <td>
                                <input id="cb12" type="checkbox" runat="server" value="12" />
                            </td>
                            <td>
                                <input id="cb13" type="checkbox" runat="server" value="13" />
                            </td>
                            <td>
                                <input id="cb14" type="checkbox" runat="server" value="14" />
                            </td>
                            <td>
                                <input id="cb15" type="checkbox" runat="server" value="15" />
                            </td>
                            <td>
                                <input id="txt16" type="text" runat="server" class="txt"/>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                10:00-11:00：
                            </td>
                            <td>
                                <input id="cb21" type="checkbox" runat="server" value="21" />
                            </td>
                            <td>
                                <input id="cb22" type="checkbox" runat="server" value="22" />
                            </td>
                            <td>
                                <input id="cb23" type="checkbox" runat="server" value="23" />
                            </td>
                            <td>
                                <input id="cb24" type="checkbox" runat="server" value="24" />
                            </td>
                            <td>
                                <input id="cb25" type="checkbox" runat="server" value="25" />
                            </td>
                            <td>
                                <input id="txt26" type="text" runat="server" class="txt"/>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                11:00-12:00：
                            </td>
                            <td>
                                <input id="cb31" type="checkbox" runat="server" value="31" />
                            </td>
                            <td>
                                <input id="cb32" type="checkbox" runat="server" value="32" />
                            </td>
                            <td>
                                <input id="cb33" type="checkbox" runat="server" value="33" />
                            </td>
                            <td>
                                <input id="cb34" type="checkbox" runat="server" value="34" />
                            </td>
                            <td>
                                <input id="cb35" type="checkbox" runat="server" value="35" />
                            </td>
                            <td>
                                <input id="txt36" type="text" runat="server" class="txt"/>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                12:00-13:00：
                            </td>
                            <td>
                                <input id="cb41" type="checkbox" runat="server" value="41" />
                            </td>
                            <td>
                                <input id="cb42" type="checkbox" runat="server" value="42" />
                            </td>
                            <td>
                                <input id="cb43" type="checkbox" runat="server" value="43" />
                            </td>
                            <td>
                                <input id="cb44" type="checkbox" runat="server" value="44" />
                            </td>
                            <td>
                                <input id="cb45" type="checkbox" runat="server" value="45" />
                            </td>
                            <td>
                                <input id="txt46" type="text" runat="server" class="txt"/>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                13:00-14:00：
                            </td>
                            <td>
                                <input id="cb51" type="checkbox" runat="server" value="51" />
                            </td>
                            <td>
                                <input id="cb52" type="checkbox" runat="server" value="52" />
                            </td>
                            <td>
                                <input id="cb53" type="checkbox" runat="server" value="53" />
                            </td>
                            <td>
                                <input id="cb54" type="checkbox" runat="server" value="54" />
                            </td>
                            <td>
                                <input id="cb55" type="checkbox" runat="server" value="55" />
                            </td>
                            <td>
                               <input id="txt56" type="text" runat="server" class="txt"/>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                14:00-15:00：
                            </td>
                            <td>
                                <input id="cb61" type="checkbox" runat="server" value="61" />
                            </td>
                            <td>
                                <input id="cb62" type="checkbox" runat="server" value="62" />
                            </td>
                            <td>
                                <input id="cb63" type="checkbox" runat="server" value="63" />
                            </td>
                            <td>
                                <input id="cb64" type="checkbox" runat="server" value="64" />
                            </td>
                            <td>
                                <input id="cb65" type="checkbox" runat="server" value="65" />
                            </td>
                            <td>
                                <input id="txt66" type="text" runat="server" class="txt"/>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                15:00-16:00：
                            </td>
                            <td>
                                <input id="cb71" type="checkbox" runat="server" value="71" />
                            </td>
                            <td>
                                <input id="cb72" type="checkbox" runat="server" value="72" />
                            </td>
                            <td>
                                <input id="cb73" type="checkbox" runat="server" value="73" />
                            </td>
                            <td>
                                <input id="cb74" type="checkbox" runat="server" value="74" />
                            </td>
                            <td>
                                <input id="cb75" type="checkbox" runat="server" value="75" />
                            </td>
                            <td>
                                <input id="txt76" type="text" runat="server" class="txt"/>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                16:00-17:00：
                            </td>
                            <td>
                                <input id="cb81" type="checkbox" runat="server" value="81" />
                            </td>
                            <td>
                                <input id="cb82" type="checkbox" runat="server" value="82" />
                            </td>
                            <td>
                                <input id="cb83" type="checkbox" runat="server" value="83" />
                            </td>
                            <td>
                                <input id="cb84" type="checkbox" runat="server" value="84" />
                            </td>
                            <td>
                                <input id="cb85" type="checkbox" runat="server" value="85" />
                            </td>
                            <td>
                               <input id="txt86" type="text" runat="server" class="txt"/>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr style="color: blue; font-size: 14px;">
                <td>
                    <br />
                    <span style="vertical-align: middle; height: 80px;">故障原因：</span>
                    <asp:TextBox ID="txtErrorReason" runat="server" Height="80px" Width="400px" TextMode="MultiLine"></asp:TextBox>
                </td>
            </tr>
            <tr style="color: blue; font-size: 14px;">
                <td>
                    <br />
                    <span style="vertical-align: middle; height: 80px;">处理情况：</span>
                    <asp:TextBox ID="txtErrSolve" runat="server" Height="80px" Width="400px" TextMode="MultiLine"></asp:TextBox>
                </td>
            </tr>
            <tr style="color: blue; font-size: 14px;">
                <td colspan="2" style="height: 18px" align="center">
                    <br />
                    <asp:Button ID="Btn_Add" runat="server" Text="添加" OnClick="Btn_Add_Click" />&nbsp;
                    <input type="button" id="Button1" value="取消" onclick="location.href=location.href;" />
                </td>
            </tr>
        </table>
        <asp:SqlDataSource ID="DeviceMaintPersonSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="SELECT [maintPersonId], [maintPersonName] FROM [maintPersonInfo]">
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="DeviceDptDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="SELECT [departmentId], [departmentName] FROM [departmentInfo]">
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="DeviceErrTypeSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="SELECT [errTypeId], [errTypeName] FROM [errTypeInfo]"></asp:SqlDataSource>
    </div>
    <input id="hidType" type="hidden" runat="server" />
    <input id="hidItem" type="hidden" runat="server" />
    <input id="hidName" type="hidden" runat="server" />
    <input id="hidId" type="hidden" runat="server" />
    </form>
</body>
</html>
